<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class=""> <!--<![endif]-->
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
     <meta property="qc:admins" content="63350727776371646636" />
  
  
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
  <title>用户注册 E-job</title>
  <meta name="keywords" content="" />
  <meta name="description" content="" />
  <link rel="shortcut icon" type="image/x-icon" href="http://static.vlms.cn/images/2014/08/hyjpep4o.png" media="screen" />
  
  <link href="http://static.vlms.cn/resources/bootstrap/css/bootstrap.css" rel="stylesheet" />
  <link rel="stylesheet" media="screen" href="http://static.vlms.cn/resources/bootstrap/css/bootstrap-extends.css" />
  
  <!-- 预览、自定义、默认css样式  -->
  <link rel="stylesheet" media="screen" href="http://static.vlms.cn/resources/css/schoolweb.css" />
  
  <!-- 回到顶部样式  -->
  <link rel="stylesheet" media="screen" href="http://static.vlms.cn/resources/css/upDown.css" />
  
  <script src="http://static.vlms.cn/resources/js/jquery.min.js"></script>
  <script src="http://static.vlms.cn/resources/js/main.js"></script>
  
  <!-- 回到顶部样式  -->
  <script src="http://static.vlms.cn/resources/js/JQscrollTop.js"></script>
  <script src="http://static.vlms.cn/resources/js/updown.js"></script>
  
    <!--[if lt IE 8]>
      <link href="//static.vlms.cn/resources/wangxiaoyun/css/oldie.css" rel="stylesheet">
    <![endif]-->
    
    <!--[if lt IE 9]>
    <script src="//static.vlms.cn/resources/wangxiaoyun/libs/html5shiv.js"></script>
    <![endif]-->

	  <!--[if IE 8]>
	    <script src="//static.vlms.cn/resources/wangxiaoyun/libs/respond.min.js"></script>
	  <![endif]-->
  
</head>
<body id="bodyColor" class="">
<!-- 顶部鼠标滑过的动画效果 -->
<style>
.nav-list > li.active > a {
    background-color: #ffa275;  
    color: #ffffff;
}

.site-navbar .navbar-nav > li > a:hover {
    background-color: #ffa275;
    color: #ffffff;
}
</style>
<!-- 顶部导航栏 -->
<div class="navbar navbar-inverse site-navbar" id="site-navbar">
  <div class="container">
    <div class="container-gap">
      <div class="navbar-header">
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
          <a class="navbar-brand-logo" href="index.html">
            <img src="resources/images/title2.png" alt="E-job" title="E-job" height="55px;" />
          </a>
      </div>
      
      <div class="navbar-collapse collapse">
          <ul class="nav navbar-nav">
                    <li><a href="course/explore-sort=latest.html"  >企业介绍</a></li>
                    <li><a href="https://www.boxueio.com/skill/swift?v"  target="_blank" >培训辅修</a></li>
                    <li><a href="page/qun.html"  >考试认证</a></li>
                    <li><a href="page/lianxi.html"  >应职报名</a></li>
                    <li><a href="page/lianxi.html"  >网上面试</a></li>
                    <li><a href="page/lianxi.html"  >E-job论坛</a></li>
                </ul>
        
        <ul class="nav navbar-nav navbar-right">
        
        </ul>        

      </div><!--/.navbar-collapse -->
    </div>
  </div>
</div>

<!-- 顶部搜索框事件及搜索跳转 -->
<script>
   $(document).ready(function(){
      $(".typehead").click(function(){
          $(this).css("background","white");
          $(".xin-search-btn").css({"background":"white","border":"1px solid #FFFFFF"});
      });
      
   	  $(".typehead").blur(function(){
          $(this).css("background","#5c5f68");
           $(".xin-search-btn").css({"background":"#5c5f68","border":"1px solid #5c5f68"});
      });
      
	  //搜索按钮
	  $(".xin-search-btn").click(function(){
	   	var key=$(".search_input").val();
	   	var url = "";
	   	if (getUrlParam('theme')) {
	   		var value = getUrlParam('theme');
	   		url="/search/course?keyword="+key+"&theme="+value;
	   	}else{
			url="/search/course?keyword="+key;
		}
		location.href=url;
	  });
	  
	  	//获取url中的参数
		function getUrlParam(name) {
			var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
			var r = window.location.search.substr(1).match(reg);  	//匹配目标参数
			if (r != null) return unescape(r[2]); return null; 		//返回参数值
		}
	
   });
</script>

<!-- 输入框信息验证，改变效果 -->
<style>
.input_status.failed {color:#f00;}
.input_status.success {color:#090;font-family:verdana;}
input.error {border:1px solid #c33;background:#fff0f0}
</style>

<div id="content-container" class="container">
  <div class="row row-6">
    <div class="col-md-6 col-md-offset-3 ptl">
      <div class="panel panel-default panel-page">
       <div id="registerStatus" class="alert alert-danger" style="display:none"></div>
       <div id="emailCheckInfo" class="alert alert-danger" style="display:none"></div>
       <div class="panel-heading"><h2>注册</h2><hr style="border-bottom:2px solid #3B6E22;margin:0px;" /></div>

       <form id="registerForm" class="form-vertical" method="post" action="/register">                <!--此处需form表单提交地址 -->


        <div class="form-group" id="form-group-email">
          <label class="control-label required" for="phonenumber">手机号</label>
          <div class="controls">
            <input type="text" id="phonenumber" name="phonenumber" value="" required="required" require="请填写手机号"  success="√" class="form-control valid" data-url="/register/checkemail" />
            <p class="help-block input_status" id="help-block-email">填写您的手机号</p>
          </div>
        </div>

        <div class="form-group" id="form-group-nickname">
          <label class="control-label required" for="register_nickname">用户名</label>
          <div class="controls">
            <input type="text" id="register_nickname" name="nickname" value="" required="required" require="请填写用户名" success="√" class="form-control valid" data-url="/register/nickname/check" checker="$.checker.nickname" default="该怎么称呼你？数字、英文均可，最长14个字符">
            <p class="help-block input_status" id="help-block-nickname">该怎么称呼你？数字、英文均可，最长14个字符</p>
          </div>
        </div>
        <div class="form-group" id="form-group-password">
          <label class="control-label required" for="register_password">密码</label>
          <div class="controls">
            <input type="password" id="register_password" name="password" required="required" require="请填写密码" success="√" class="form-control valid" checker="$.checker.passwd"/>
            <p class="help-block input_status" id="help-block-password">6-20位英文、数字、符号，区分大小写</p>
          </div>
        </div>

        <div class="form-group" id="form-group-confirmPassword">
          <label class="control-label required" for="register_confirmPassword">确认密码</label>
          <div class="controls">
            <input type="password" id="register_confirmPassword" name="confirmPassword" required="required" require="请确认密码" success="√" class="form-control valid"  checker="$.checker.passwd"/>
            <p class="help-block input_status" id="help-block-confirmPassword">再输入一次密码</p>
          </div>
        </div>

        <div class="form-group">
          <div class="controls">
            <button type="button" class="btn btn-primary btn-large btn-block" id="submit">注册</button>
          </div>
        </div>

      </form>
      
        <div class="cooper-login">
        
        </div>

    </div><!-- /panel -->

  </div>
  </div>

</div><!-- /container -->  


	<div class="site-footer container clearfix">   
	  <div class="alert text-center"><a href="http://www.miitbeian.gov.cn/" target="_blank"> 粤ICP备14044760-1</a></div>
	</div>

  
<div id="ScrollToTop" class="btnimg Button2" style="color: rgb(255, 255, 255);text-align: center; display: block; background-color: rgba(12, 173, 87, 0.69);padding: 11px; width: 60px;bottom:15px;">返回<br>顶部</div>
  <div id="login-modal" class="modal" data-url="/login/ajax"></div>
  <div id="modal" class="modal"></div>


<script src="http://static.vlms.cn/resources/js/jquery.form.min.js"></script>
<script src="http://static.vlms.cn/resources/js/bootstrapValidator.min.js"></script>
<script src="http://static.vlms.cn/resources/bootstrap/js/bootstrap.min.js"></script>
<script src="http://static.vlms.cn/resources/js/autocomplete.js"></script>
<script src="http://static.vlms.cn/resources/js/bootstrap-notify.js"></script>
<script src="http://static.vlms.cn/resources/js/valid.js"></script>
<script type="text/javascript" src="resources/js/utils.js"></script>
<script src="resources/js/rightBar.js"></script>


<script>
$(document).ready(function(){
  $("#registerForm").validation();
  
  //验证emial是否已经注册过
  $("#phonenumber").blur(function(){
  	  var phonenumber=$("#phonenumber").val();
  	  var url="/register/checkPhonenumber";                                                                      //
      AjaxIO.post(url, {phonenumber: phonenumber}, function(results) {
           console.log(results);
           if(!results.data.success){
              $("#help-block-email").attr("class","help-block input_status failed");
              $("#help-block-email").html("该手机号已经被注册");
           }
      });
  }); 
  $("#register_nickname").blur(function(){
      var username=$("#register_nickname").val();
      var url="/register/checkUsername";                                                                      //
      AjaxIO.post(url, {username: username}, function(results) {
           console.log(results);
           if(!results.data.success){
              $("#help-block-email").attr("class","help-block input_status failed");
              $("#help-block-email").html("该用户名已经被注册");
           }
      });
  });

  $('#submit').click(function(event) {
     console.log("点击了")
      var phonenumber=$("#phonenumber").val();
      var password = $('#register_password').val();
      var username = $('#register_nickname').val();

      AjaxIO.post('/register', {phonenumber: phonenumber,password:password,username:username}, function(results) {
          console.log(results)
          if (results.status == 200) {
            AjaxIO.post('/login', {phonenumber: phonenumber,password:password}, function(results) {
                if (results.status == 200) {
                  localStorage.setItem("token",results.data.token)
                  location.href = "index.html"
                } else {}
            });
          } else {
            alert("注册失败")
          }
      });
  });
  
});


</script>


  </body>
</html>